﻿using LuShanTea.Service.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LuShanTea.Service.ModelConfig
{
    public class GoodAttrConfig : EntityTypeConfiguration<GoodAttr>
    {
        public GoodAttrConfig()
        {
            this.ToTable("T_GoodAttrs");

            this.HasRequired(e => e.Good).WithMany().HasForeignKey(e => e.GoodId);

            this.Property(e => e.ProNumber).IsRequired().HasMaxLength(16);
            this.Property(e => e.Level).IsRequired().HasMaxLength(16);
            this.Property(e => e.ArtDesc).IsRequired().HasMaxLength(16);
        }
    }
}
